package com.awt.layoutManager;

import java.awt.*;

/**
 * @authoer zsj
 * @date 2023/4/15 13:01
 */
public class GridLayoutDemo {
    public static void main(String[] args) {
        Frame frame = new Frame("GridLayoutDemo");
        Panel top = new Panel();
        Panel foot = new Panel();;
        top.add(new TextField(30));
        foot.setLayout(new GridLayout(3,5));

        for (int i = 0; i < 10; i++) {
            foot.add(new Button(i+""));
        }
        foot.add(new Button("+"));
        foot.add(new Button("-"));
        foot.add(new Button("*"));
        foot.add(new Button("/"));
        foot.add(new Button("="));

        frame.add(top,BorderLayout.NORTH);
        frame.add(foot);
        frame.pack();
        frame.setVisible(true);
    }

}
